package com.zhengyun.web01.controller;
import com.zhengyun.web01.feign.ClientFeign;
import commonutils.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/test")
public class TestWebController {
    @Value("${c}")
    String value;
    @Resource
    private ClientFeign clientFeign;

    @RequestMapping("/getTest")
    public String getTest(HttpServletRequest request) {
        Boolean b = ObjectUtils.isBlank(request);
        System.out.println(b);
        return "11";
    }
    @GetMapping("hi")
    public String hi(@RequestParam String name){
        return clientFeign.getHello(name);
    }

    @RequestMapping("/value")
    public String value() {
        return "value"+value;
    }
}
